package letsjava.locale;

import java.text.NumberFormat;
import java.text.ParseException;
import java.util.*;

public class Test {
	public static void main(String[] args) throws ParseException{
		
		Locale loc = new Locale("de","DE");
		
		NumberFormat curFormat = NumberFormat.getCurrencyInstance(loc);
		
		double amt = 123456.78;
		
		String result = curFormat.format(amt);
		
		System.out.println(result);
		
		NumberFormat numberInst = NumberFormat.getNumberInstance();
		Number input = numberInst.parse(result);
		System.out.println(input.doubleValue());
		
		
	}
}
